From: awilliam@xenbuild.aw Date: Mon, 24 Jul 2006 20:26:03 +0000 (-0600) Subject: [IA64] Support domU coredump on ia64 X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15786^2~18 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=9d20d1268d20d5fad545586ecde59516339d66d1;p=xen.git [IA64] Support domU coredump on ia64 This patch supports domU coredump on ia64. xen_panic_event() is registered to panic_notifier_list, and xen_panic_event() calls HYPERVISOR_shutdown(SHUTDOWN_crash) at panic time. If xend is notified of crash status, xend calls dumpCore() and create domU's core in /var/xen/dump. For sample crash module and usage, see: http://lists.xensource.com/archives/html/xen-ia64-devel/2006-07/msg00230.html Signed-off-by: Akio Takebe [minor code re-arrangement] Signed-off-by: Alex Williamson --- diff --git a/linux-2.6-xen-sparse/arch/ia64/kernel/setup.c b/linux-2.6-xen-sparse/arch/ia64/kernel/setup.c index 463188ce09..12ab159f0d 100644 --- a/linux-2.6-xen-sparse/arch/ia64/kernel/setup.c +++ b/linux-2.6-xen-sparse/arch/ia64/kernel/setup.c @@ -75,6 +75,20 @@ unsigned long __per_cpu_offset[NR_CPUS]; EXPORT_SYMBOL(__per_cpu_offset); #endif +#ifdef CONFIG_XEN +static int +xen_panic_event(struct notifier_block *this, unsigned long event, void *ptr) +{ + HYPERVISOR_shutdown(SHUTDOWN_crash); + /* we're never actually going to get here... */ + return NOTIFY_DONE; +} + +static struct notifier_block xen_panic_block = { + xen_panic_event, NULL, 0 /* try to go last */ +}; +#endif + extern void ia64_setup_printk_clock(void); DEFINE_PER_CPU(struct cpuinfo_ia64, cpu_info); @@ -418,8 +432,11 @@ setup_arch (char **cmdline_p) unw_init(); #ifdef CONFIG_XEN - if (is_running_on_xen()) + if (is_running_on_xen()) { setup_xen_features(); + /* Register a call for panic conditions. */ + notifier_chain_register(&panic_notifier_list, &xen_panic_block); + } #endif ia64_patch_vtop((u64) __start___vtop_patchlist, (u64) __end___vtop_patchlist);